import React from 'react';
export default class Usershow extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
    	tags:[
    		{
    			key: "info",
    			value:"基本信息"
    	  },
    	  {
    	    key: "safe",
    			value:"邮箱认证"
    		},
        {
          key: "psafe",
          value:"手机认证"
        },
    		{
    			key: "source",
    			value: "我的资源"
    		},
    		{
    			key: "blog",
    			value:"博客中心"
    		},
    		{
    			key: "delete",
    			value:"删帖记录"
    		},
    		{
    			key: "room",
    			value: "码客大厅"
    		},
    		{
    			key: "count",
    			value:"数据统计"
    		}
    	],
      current : "info"
    }
  }

  changeCurrent(e) {
    this.setState({
      current:e 
    });
  }

  render() {
    return (
      <div className="user_menu_dropdown">
      	<ul>
      	{
      		this.state.tags.map((item,i)=>(
      			<li key={i} className="menu_list"><a value={item.key} onClick={
              event=>{
                this.props.goto(item.key);
                this.changeCurrent(item.key);
              }
            } className={this.state.current==item.key?"item_link deep":"item_link"}>{item.value}</a></li>
      		))
      	}
      	</ul>
      </div>
    );
  }
}